<template>
  <div class='charts' ref='charts'></div>
</template>

<script>
import * as echarts from 'echarts'
export default {
  name: 'progressCharts',
  mounted () {
    // 准备宽高容器 初始化实例
    let progressCharts = echarts.init (this.$refs.charts)
    progressCharts.setOption ({
      xAxis: {
        show: false,
        // 最大值最小值
        min: 0,
        max: 100
      },
      yAxis: {
        show: false,
        type: 'category'
      },
      series: [
       {
          type: 'bar',
          data: [88],
          color:'yellowgreen',
          barWidth: 10,
          showBackground: true,
          backgroundStyle: {
            color: '#eee'
          },
          // 文本
          label: {
            show: true,
            formatter: '|',
            position: 'right'
          }
       }
      ],
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0,
      },
      tooltip: {
        
      }
    })
    
}
}
</script>

<style scoped>
  .charts {
    height: 100%;
    width: 100%;
  }
</style>
